#-------------------------------------------------------------------
# This file is part of the CMake build system for OGRE-Next
#     (Object-oriented Graphics Rendering Engine)
# For the latest info, see http://www.ogre3d.org/
#
# The contents of this file are placed in the public domain. Feel
# free to make use of it in any way you like.
#-------------------------------------------------------------------

# OGRE CMake package file
# - check if package version satisfies requested version

set(PACKAGE_VERSION @OGRE_VERSION@)
set(PACKAGE_VERSION_MAJOR @OGRE_VERSION_MAJOR@)
set(PACKAGE_VERSION_MINOR @OGRE_VERSION_MINOR@)
set(PACKAGE_VERSION_EXACT FALSE)
set(PACKAGE_VERSION_COMPATIBLE FALSE)

if(${PACKAGE_VERSION} VERSION_EQUAL ${PACKAGE_FIND_VERSION})
	set(PACKAGE_VERSION_EXACT TRUE)
	set(PACKAGE_VERSION_COMPATIBLE TRUE)
elseif(${PACKAGE_VERSION} VERSION_GREATER ${PACKAGE_FIND_VERSION})
  # compatibility is only guaranteed if major and minor version numbers match
  if (PACKAGE_FIND_VERSION_MAJOR EQUAL ${PACKAGE_VERSION_MAJOR} AND
      PACKAGE_FIND_VERSION_MINOR EQUAL ${PACKAGE_VERSION_MINOR})
    set(PACKAGE_VERSION_COMPATIBLE TRUE)
  endif (PACKAGE_FIND_VERSION_MAJOR EQUAL ${PACKAGE_VERSION_MAJOR} AND
      PACKAGE_FIND_VERSION_MINOR EQUAL ${PACKAGE_VERSION_MINOR})
endif(${PACKAGE_VERSION} VERSION_EQUAL ${PACKAGE_FIND_VERSION})
